# encoding: utf-8
# @project: st2111 
# @file: re_groups_alternative.py
# @time: 2023/4/13 15:31
# @author: abcque
# @license: (C) Copyright 2013-2021
# @contact: abcque@outlook.com
# @IDE: PyCharm
# @desc:
from chapter5.regular_expression.testre.re_test_patterns_groups import test_patterns

if __name__ == "__main__":
    text = "abbaaaaabbbbba"

    patterns = [
        (r"a((a+)|(b+))", "a 后面紧跟着由 a 或则 b 组成串"),
        (r"a((a+)|(b+))+", "a 后面紧跟着由 a 或则 b 组成串"),
    ]

    test_patterns(text=text, patterns=patterns)
